<template>
  <div id='music-player'></div>
</template>

<script setup lang='ts'>
import 'aplayer-ts/dist/APlayer.min.css'
import { onMounted } from 'vue'

onMounted(() => {
  const ap = new APlayer({
    container: document.getElementById('music-player'),
    theme: '#FADFA3',
    fixed: true,
    autoplay: false,
    volume: 0.4,
    audio: [
      {
        name: '身骑白马 (合唱版)',
        artist: '张小伙/粥粥zxr',
        url: 'https://xingqiu-tuchuang-1256524210.cos.ap-shanghai.myqcloud.com/5378/%E8%BA%AB%E9%AA%91%E7%99%BD%E9%A9%AC(%E5%90%88%E5%94%B1%E7%89%88)-%E5%BC%A0%E5%B0%8F%E4%BC%99-%E7%B2%A5%E7%B2%A5zxr.mp3',
        cover: 'https://p2.music.126.net/e8H_QXXvsC4nng55haVoWA==/109951164075582426.jpg'
      }
    ]
  })
})

</script>

<style scoped>

</style>
